<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" s>
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <script src="layui/layui.js"></script>
    <link rel="stylesheet" href="layui/css/layui.css" />
    <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
</head>

<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
    <legend>个人中心</legend>
</fieldset>
<div class="layui-collapse" lay-accordion="">
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">昵称</h2>
        <div class="layui-colla-content layui-show">
            <p th:text="${session.user.getNickname()}"></p>
        </div>
    </div>
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">手机号</h2>
        <div class="layui-colla-content">
            <p th:text="${session.user.getTelenum()}"></p>
        </div>
    </div>
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">性别</h2>
        <div class="layui-colla-content">
            <p th:text="${session.user.getSex()}"></p>
        </div>
    </div>
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">生日</h2>
        <div class="layui-colla-content">
            <p th:text="${session.user.getBirthday()}"></p>
        </div>
    </div>
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">家乡</h2>
        <div class="layui-colla-content">
            <p th:text="'来自' + ${session.user.getDwells()}"></p>
        </div>
    </div>
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">学院信息</h2>
        <div class="layui-colla-content">
            <p th:text="'是' + ${session.user.getCollege()+'学院' + ${session.user.getMajor()} + '专业' + ${session.user.getGrade()}+'级的学生'}"></p>
        </div>
    </div>
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">宿舍</h2>
        <div class="layui-colla-content">
            <p th:text="${session.user.getDormitory()}"></p>
        </div>
    </div>
</div>
<script>
    layui.use(['element', 'layer'], function(){
        var element = layui.element;
        var layer = layui.layer;

        //监听折叠
        element.on('collapse(test)', function(data){
            layer.msg('展开状态：'+ data.show);
        });
    });
</script>
</body>
</html>